Optimal. Leaf size=150 \[ -\frac{70 c^4 \tan (e+f x)}{3 a^2 f}+\frac{35 c^4 \tanh ^{-1}(\sin (e+f x))}{2 a^2 f}+\frac{35 c^4 \tan (e+f x) \sec (e+f x)}{6 a^2 f}-\frac{14 \tan (e+f x) \left (c^2-c^2 \sec (e+f x)\right )^2}{3 f \left (a^2 \sec (e+f x)+a^2\right )}+\frac{2 c \tan (e+f x) (c-c \sec (e+f x))^3}{3 f (a \sec (e+f x)+a)^2} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.215091, antiderivative size = 150, normalized size of antiderivative = 1., number of steps used = 7, number of rules used = 6, integrand size = 32, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.188, Rules used = {3957, 3788, 3767, 8, 4046, 3770} \[ -\frac{70 c^4 \tan (e+f x)}{3 a^2 f}+\frac{35 c^4 \tanh ^{-1}(\sin (e+f x))}{2 a^2 f}+\frac{35 c^4 \tan (e+f x) \sec (e+f x)}{6 a^2 f}-\frac{14 \tan (e+f x) \left (c^2-c^2 \sec (e+f x)\right )^2}{3 f \left (a^2 \sec (e+f x)+a^2\right )}+\frac{2 c \tan (e+f x) (c-c \sec (e+f x))^3}{3 f (a \sec (e+f x)+a)^2} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3957
Rule 3788
Rule 3767
Rule 8
Rule 4046
Rule 3770
Rubi steps
\begin{align*} \int \frac{\sec (e+f x) (c-c \sec (e+f x))^4}{(a+a \sec (e+f x))^2} \, dx &=\frac{2 c (c-c \sec (e+f x))^3 \tan (e+f x)}{3 f (a+a \sec (e+f x))^2}-\frac{(7 c) \int \frac{\sec (e+f x) (c-c \sec (e+f x))^3}{a+a \sec (e+f x)} \, dx}{3 a}\\ &=\frac{2 c (c-c \sec (e+f x))^3 \tan (e+f x)}{3 f (a+a \sec (e+f x))^2}-\frac{14 \left (c^2-c^2 \sec (e+f x)\right )^2 \tan (e+f x)}{3 f \left (a^2+a^2 \sec (e+f x)\right )}+\frac{\left (35 c^2\right ) \int \sec (e+f x) (c-c \sec (e+f x))^2 \, dx}{3 a^2}\\ &=\frac{2 c (c-c \sec (e+f x))^3 \tan (e+f x)}{3 f (a+a \sec (e+f x))^2}-\frac{14 \left (c^2-c^2 \sec (e+f x)\right )^2 \tan (e+f x)}{3 f \left (a^2+a^2 \sec (e+f x)\right )}+\frac{\left (35 c^2\right ) \int \sec (e+f x) \left (c^2+c^2 \sec ^2(e+f x)\right ) \, dx}{3 a^2}-\frac{\left (70 c^4\right ) \int \sec ^2(e+f x) \, dx}{3 a^2}\\ &=\frac{35 c^4 \sec (e+f x) \tan (e+f x)}{6 a^2 f}+\frac{2 c (c-c \sec (e+f x))^3 \tan (e+f x)}{3 f (a+a \sec (e+f x))^2}-\frac{14 \left (c^2-c^2 \sec (e+f x)\right )^2 \tan (e+f x)}{3 f \left (a^2+a^2 \sec (e+f x)\right )}+\frac{\left (35 c^4\right ) \int \sec (e+f x) \, dx}{2 a^2}+\frac{\left (70 c^4\right ) \operatorname{Subst}(\int 1 \, dx,x,-\tan (e+f x))}{3 a^2 f}\\ &=\frac{35 c^4 \tanh ^{-1}(\sin (e+f x))}{2 a^2 f}-\frac{70 c^4 \tan (e+f x)}{3 a^2 f}+\frac{35 c^4 \sec (e+f x) \tan (e+f x)}{6 a^2 f}+\frac{2 c (c-c \sec (e+f x))^3 \tan (e+f x)}{3 f (a+a \sec (e+f x))^2}-\frac{14 \left (c^2-c^2 \sec (e+f x)\right )^2 \tan (e+f x)}{3 f \left (a^2+a^2 \sec (e+f x)\right )}\\ \end{align*}
Mathematica [B] time = 1.94691, size = 349, normalized size = 2.33 \[ \frac{c^4 \sin ^3\left (\frac{1}{2} (e+f x)\right ) \cos \left (\frac{1}{2} (e+f x)\right ) \sec ^2(e+f x) \left (-32 \tan \left (\frac{e}{2}\right ) \cot \left (\frac{1}{2} (e+f x)\right ) \csc ^2\left (\frac{1}{2} (e+f x)\right )-32 \sec \left (\frac{e}{2}\right ) \sin \left (\frac{f x}{2}\right ) \csc ^3\left (\frac{1}{2} (e+f x)\right )+3 \cot ^3\left (\frac{1}{2} (e+f x)\right ) \left (-\frac{24 \sin (f x)}{\left (\cos \left (\frac{e}{2}\right )-\sin \left (\frac{e}{2}\right )\right ) \left (\sin \left (\frac{e}{2}\right )+\cos \left (\frac{e}{2}\right )\right ) \left (\cos \left (\frac{1}{2} (e+f x)\right )-\sin \left (\frac{1}{2} (e+f x)\right )\right ) \left (\sin \left (\frac{1}{2} (e+f x)\right )+\cos \left (\frac{1}{2} (e+f x)\right )\right )}+\frac{1}{\left (\cos \left (\frac{1}{2} (e+f x)\right )-\sin \left (\frac{1}{2} (e+f x)\right )\right )^2}-\frac{1}{\left (\sin \left (\frac{1}{2} (e+f x)\right )+\cos \left (\frac{1}{2} (e+f x)\right )\right )^2}-70 \log \left (\cos \left (\frac{1}{2} (e+f x)\right )-\sin \left (\frac{1}{2} (e+f x)\right )\right )+70 \log \left (\sin \left (\frac{1}{2} (e+f x)\right )+\cos \left (\frac{1}{2} (e+f x)\right )\right )\right )-256 \sec \left (\frac{e}{2}\right ) \sin \left (\frac{f x}{2}\right ) \cot ^2\left (\frac{1}{2} (e+f x)\right ) \csc \left (\frac{1}{2} (e+f x)\right )\right )}{3 a^2 f (\sec (e+f x)+1)^2} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.092, size = 186, normalized size = 1.2 \begin{align*} -{\frac{8\,{c}^{4}}{3\,f{a}^{2}} \left ( \tan \left ({\frac{fx}{2}}+{\frac{e}{2}} \right ) \right ) ^{3}}-24\,{\frac{{c}^{4}\tan \left ( 1/2\,fx+e/2 \right ) }{f{a}^{2}}}-{\frac{{c}^{4}}{2\,f{a}^{2}} \left ( \tan \left ({\frac{fx}{2}}+{\frac{e}{2}} \right ) +1 \right ) ^{-2}}+{\frac{13\,{c}^{4}}{2\,f{a}^{2}} \left ( \tan \left ({\frac{fx}{2}}+{\frac{e}{2}} \right ) +1 \right ) ^{-1}}+{\frac{35\,{c}^{4}}{2\,f{a}^{2}}\ln \left ( \tan \left ({\frac{fx}{2}}+{\frac{e}{2}} \right ) +1 \right ) }+{\frac{{c}^{4}}{2\,f{a}^{2}} \left ( \tan \left ({\frac{fx}{2}}+{\frac{e}{2}} \right ) -1 \right ) ^{-2}}+{\frac{13\,{c}^{4}}{2\,f{a}^{2}} \left ( \tan \left ({\frac{fx}{2}}+{\frac{e}{2}} \right ) -1 \right ) ^{-1}}-{\frac{35\,{c}^{4}}{2\,f{a}^{2}}\ln \left ( \tan \left ({\frac{fx}{2}}+{\frac{e}{2}} \right ) -1 \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] time = 1.02256, size = 717, normalized size = 4.78 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 0.494155, size = 487, normalized size = 3.25 \begin{align*} \frac{105 \,{\left (c^{4} \cos \left (f x + e\right )^{4} + 2 \, c^{4} \cos \left (f x + e\right )^{3} + c^{4} \cos \left (f x + e\right )^{2}\right )} \log \left (\sin \left (f x + e\right ) + 1\right ) - 105 \,{\left (c^{4} \cos \left (f x + e\right )^{4} + 2 \, c^{4} \cos \left (f x + e\right )^{3} + c^{4} \cos \left (f x + e\right )^{2}\right )} \log \left (-\sin \left (f x + e\right ) + 1\right ) - 2 \,{\left (164 \, c^{4} \cos \left (f x + e\right )^{3} + 229 \, c^{4} \cos \left (f x + e\right )^{2} + 30 \, c^{4} \cos \left (f x + e\right ) - 3 \, c^{4}\right )} \sin \left (f x + e\right )}{12 \,{\left (a^{2} f \cos \left (f x + e\right )^{4} + 2 \, a^{2} f \cos \left (f x + e\right )^{3} + a^{2} f \cos \left (f x + e\right )^{2}\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \frac{c^{4} \left (\int \frac{\sec{\left (e + f x \right )}}{\sec ^{2}{\left (e + f x \right )} + 2 \sec{\left (e + f x \right )} + 1}\, dx + \int - \frac{4 \sec ^{2}{\left (e + f x \right )}}{\sec ^{2}{\left (e + f x \right )} + 2 \sec{\left (e + f x \right )} + 1}\, dx + \int \frac{6 \sec ^{3}{\left (e + f x \right )}}{\sec ^{2}{\left (e + f x \right )} + 2 \sec{\left (e + f x \right )} + 1}\, dx + \int - \frac{4 \sec ^{4}{\left (e + f x \right )}}{\sec ^{2}{\left (e + f x \right )} + 2 \sec{\left (e + f x \right )} + 1}\, dx + \int \frac{\sec ^{5}{\left (e + f x \right )}}{\sec ^{2}{\left (e + f x \right )} + 2 \sec{\left (e + f x \right )} + 1}\, dx\right )}{a^{2}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.27273, size = 198, normalized size = 1.32 \begin{align*} \frac{\frac{105 \, c^{4} \log \left ({\left | \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) + 1 \right |}\right )}{a^{2}} - \frac{105 \, c^{4} \log \left ({\left | \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) - 1 \right |}\right )}{a^{2}} + \frac{6 \,{\left (13 \, c^{4} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{3} - 11 \, c^{4} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )\right )}}{{\left (\tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{2} - 1\right )}^{2} a^{2}} - \frac{16 \,{\left (a^{4} c^{4} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{3} + 9 \, a^{4} c^{4} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )\right )}}{a^{6}}}{6 \, f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]